import { lazy } from "react";
import {
  AppOutline,
  MessageOutline,
  MessageFill,
  UnorderedListOutline,
  UserOutline,
} from 'antd-mobile-icons'
const Layout=lazy(()=>import("../pages/Layout"))
const Home=lazy(()=>import("../pages/Home"))
const Search=lazy(()=>import("../pages/Search"))
const Props=lazy(()=>import("../pages/Props"))
const Text=lazy(()=>import("../pages/Text"))
const User=lazy(()=>import("../pages/User"))
const Login=lazy(()=>import("../pages/Login"))
const Register=lazy(()=>import("../pages/Register"))
const List=lazy(()=>import("../pages/List"))
const Deitle=lazy(()=>import("../pages/Deitle"))
const City=lazy(()=>import("../pages/City"))
const Order=lazy(()=>import("../pages/Order"))
const Orderdel=lazy(()=>import("../pages/Orderdel"))
const Success=lazy(()=>import("../pages/Success"))
export const handleHomes=[
    {
        path:"/",
        element:<Home></Home>,
        title:"首页",
        icon:<AppOutline/>
    },
    {
        path:"/search",
        element:<Search></Search>,
        title:"搜素",
        icon:<MessageOutline/>
    },
    {
        path:"/text",
        element:<Text></Text>,
        title:"关注",
        icon:<MessageFill/>
    },
    {
        path:"/props",
        element:<Props></Props>,
        title:"票务",
        icon:<UnorderedListOutline/>
    },
    
    {
        path:"/user",
        element:<User></User>,
        title:"个人中心",
        icon:<UserOutline/>
    }
]

export const routes=[
    {
        path:"/",
        element:<Layout></Layout>,
        children:handleHomes
    },
    {
        path:"/login",
        element:<Login></Login>
    },
    {
        path:"/register",
        element:<Register></Register>
    },
    {
        path:"/list",
        element:<List></List>
    },
    {
        path:"/deitle",
        element:<Deitle></Deitle>
    },
    {
        path:"/city",
        element:<City></City>
    },
    {
        path:"/order",
        element:<Order></Order>
    },
    {
        path:"/orderdel",
        element:<Orderdel></Orderdel>
    },
    {
        path:"/success",
        element:<Success></Success>
    }
]